package cn.tedu.spring.eg3;

import jakarta.annotation.PostConstruct;
import jakarta.annotation.PreDestroy;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class ShopController {

    private String shopController;

    public ShopController() {
        System.out.println("1.");
    }
@Value("shopController")
    public void setShopController(String shopController) {
        this.shopController = shopController;
    System.out.println("2.");
    }
    @PostConstruct
    public void init(){
        System.out.println("3.");
    }
    @PreDestroy
    public void destroy(){
        System.out.println("5.");
    }
}
